package Package.dao;

public class HelloSpring5 {

    private String name;
    private int age;


    public void show(){
        System.out.println("入门案例----姓名："+name+"年龄："+age);
    }



    //setter注入
    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    //构造器注入
    public HelloSpring5(String name, int age) {
        this.name = name;
        this.age = age;
    }
}
